import { userInfoAPI } from '@/api/user'

export default {
  namespaced: true,
  state: {
    userInfo: {}
  },
  mutations: {
    SAVE_USERINFO (state, obj) {
      state.userInfo = obj
    }
  },
  actions: {
    async GET_USERINFO (ctx) {
      const res = await userInfoAPI()
    //   console.log(res);
      ctx.commit('SAVE_USERINFO',res.data)
    }
  }
}
